<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="sf" uri="http://www.springframework.org/tags/form"%>

<div class="ftitle">申请信息</div>
<sf:form method="post" modelAttribute="leave" id="leave_form">
	<table style="text-align: right;">
		<tbody>
			<tr>
				<td>申请人:</td>
				<td><sf:input id="leavePid" path="person.id" />
			<tr>
				<td>开始时间:</td>
				<td><sf:input path="startTime" cssClass="easyui-datetimebox"
						data-options="required:true,showSeconds:true" required="true" /></td>
			</tr>
			<tr>
				<td>返回时间:</td>
				<td><sf:input path="endTime" cssClass="easyui-datetimebox"
						data-options="required:true,showSeconds:true" required="true" /></td>
			</tr>
			<tr>
				<td>事由:</td>
				<td><sf:textarea rows="3" path="reason"
						cssClass="easyui-validatebox" required="true" /></td>
			</tr>
		</tbody>
	</table>
</sf:form>
<hr>
<a href="javascript:saveLeave();" class="easyui-linkbutton"
	data-options="iconCls:'icon-save'" style="float: left;">保存</a>
<a href="javascript:$('#leave_win').window('close');"
	class="easyui-linkbutton" data-options="iconCls:'icon-save'"
	style="float: right;">取消</a>
<script type="text/javascript">
	$('#leavePid').combobox({
		url : 'person/list?page=1&rows=1000',
		method:'GET',
		valueField : 'id',
		textField : 'name',
		groupField:'organization',
		groupFormatter: function(group){
			return '<span style="color:blue;">' + group + '</span>';
		},
		loadFilter:function(data){
			return data.rows;				
		}

	});
</script>
